package com.zhl.common.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: z156940l@outlook.com
 * @Date: 2021/8/2 14:40
 */
@Data
@ApiModel("分页查询")
@NoArgsConstructor
public class PageReqVO<T> {
    @ApiModelProperty("页面大小")
    private Long pageSize = 10L;
    @ApiModelProperty("当前页")
    private Long pageNum = 0L;
    @ApiModelProperty("查询条件")
    private T condition;
    @ApiModelProperty("查询or导出")
    private Long operType = 0L;
    @ApiModelProperty("是否查询全部")
    private Long isAll = 0L;

    public PageReqVO(Long pageNum, Long pageSize) {
        this.pageNum = pageNum > 0L ? pageNum : 0L;
        this.pageSize = pageSize > 0L ? pageSize : 10L;
    }
}
